package com.jy.appmarket.model;

import java.util.ArrayList;

public class AppDetailInfo extends AppInfoModel{
	private static final long serialVersionUID = 7171474084958469821L;
	private String mCategory;
	private String mVersion;
	private String mDescDetail;
	private int mSmallIntroImageSize[] = null;
	private int mLargeIntroImageSize[] = null;
	private ArrayList<IntroImageUrl> mIntroImageList = null;
	
	public String getCategory() {
		return mCategory;
	}

	public void setCategory(String mCategory) {
		this.mCategory = mCategory;
	}
	
	public String getDescDetail() {
		return mDescDetail;
	}

	public void setDescDetail(String mDescDetail) {
		this.mDescDetail = mDescDetail;
	}

	public String getVersion() {
		return mVersion;
	}

	public void setVersion(String mVersion) {
		this.mVersion = mVersion;
	}

	public int[] getSmallIntroImageSize() {
		return mSmallIntroImageSize;
	}

	public void setSmallIntroImageSize(int w, int h) {
		int size[] = new int[2];
		size[0] = w;
		size[1] = h;
		this.mSmallIntroImageSize = size;
	}

	public int[] getLargeIntroImageSize() {
		return mLargeIntroImageSize;
	}

	public void setLargeIntroImageSize(int w, int h) {
		int size[] = new int[2];
		size[0] = w;
		size[1] = h;
		this.mLargeIntroImageSize = size;
	}
	
	public ArrayList<IntroImageUrl> getIntroImageList() {
		return mIntroImageList;
	}
	
	public void addItemToIntroImageList(IntroImageUrl introImageUrl) {
		if(introImageUrl == null){
			return;
		}
		
		if(mIntroImageList == null){
			mIntroImageList = new ArrayList<IntroImageUrl>();
		}
		
		mIntroImageList.add(introImageUrl);
	}
	
	public ArrayList<String> getLargeIntroImageUrls(){
		if(mIntroImageList == null || mIntroImageList.size() == 0){
			return null;
		}
		
		ArrayList<String> urls = new ArrayList<String>();
		for(IntroImageUrl introUrl : mIntroImageList){
			urls.add(introUrl.getLargeImageUrl());
		}
		return urls;
	}
	

}
